# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=python-zc.lockfile
_pkgname=${pkgname#python-}
pkgver=3.0.post1
pkgrel=2
arch=('any')
pkgdesc="Zope testing frameworks"
url="https://github.com/zopefoundation/$_pkgname"
license=('custom:ZPL')
makedepends=('python-setuptools')
checkdepends=('python-zope-testing' 'python-zope-testrunner')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha512sums=('c420295c867e65d6c502c064591967349acdb825b313a4bbd8d573090baf47b98056f0cafd23052e8d1cb8dc79ccf0715abbf8fce36d2966949b37d4a681d8bf')

build() {
  cd $_pkgname-$pkgver
  python setup.py build
}

check() {
  cd $_pkgname-$pkgver
  PYTHONPATH="$PWD"/src zope-testrunner --test-path=src -vc
}

package() {
  depends=('python')
  cd $_pkgname-$pkgver

  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

  install -Dm 644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
